import request from '@/utils/request';

export interface insertExpressInfoData {
  responseCode: number;
  id?: string;
  receivPlaceName?: string;
  courierServicesCompany?: string;
  courierNumber?: string;
  printingSurfaceImg?: string;
  imprintingImg?: string;
  frameOneImg?: string;
  frameTwoImg?: string;
  frameThreeImg?: string;
  state?: string;
  remarks?: string;
}

/**
 * 添加快递信息
 * @param data
 */
export function insertExpressInfo(data: insertExpressInfoData): Promise<any> {
  return request('/sealCuttingApi/express/insertExpressInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 添加快递信息
 * @param data
 */
export function updateExpressInfo(data: insertExpressInfoData): Promise<any> {
  return request('/sealCuttingApi/express/updateExpressInfo', {
    method: 'POST',
    data,
  });
}

/**
 * 查看快递信息
 * @param data
 */
export function queryByIdExpressInfo(params: insertExpressInfoData): Promise<any> {
  return request('/sealCuttingApi/express/queryByIdExpressInfo', {
    params,
  });
}

/**
 * 删除快递
 * @param data
 */
export function deleteExpressInfo(params: { id: any }): Promise<any> {
  return request('/sealCuttingApi/express/deleteExpressInfo', {
    method: 'POST',
    params,
  });
}

/**
 * 新增词条接口
 * @param data
 */
export function insertEntry(data: any): Promise<any> {
  return request('/sealCuttingApi/entryInfo/insertEntry', {
    method: 'POST',
    data,
  });
}

/**
 * 修改词条接口
 * @param data
 */
export function updateEntry(data: any): Promise<any> {
  return request('/sealCuttingApi/entryInfo/updateEntry', {
    method: 'POST',
    data,
  });
}

/**
 * 删除词条接口
 * @param data
 */
export function delEntry(params: { id: any }): Promise<any> {
  return request('/sealCuttingApi/entryInfo/delEntry', {
    method: 'POST',
    params,
  });
}
